package com.modai.springcloud.entities;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：modai
 * @date ：Created in 2020-12-12 23:45
 * @description：
 */
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${server.port}")
    private String serverPort;

    @Value("${config.info}")
    private String info;

    @GetMapping(value = "/info")
    public String configure(){
        return serverPort+": 这时端口\n"+info+":这是配置中的信息。";
    }

}
